{% if user.is_authenticated %}
<div align="right">
  <p>Hello, {{ user.username }}. U have logged in.</p>
  <p>back to <a href="/">[HOME]</a> or <a href="/accounts/logout/" >Log out</a></p>
</div>
{% else %}
<div align="right">
  <fieldset>
    <legend>Logging in</legend>
    <form action="" method="post" target="_top">{% csrf_token %}
      {{ form.as_p }}
      <p><input type="submit" value="Login" /></p>
    </form>
  </fieldset>
</div>
<div align="right">
<p>or <a href="/accounts/register/">Register</a> to be a validated user</p>
</div>
{% endif %}
